package com.cloudcross.ssp.service;

import java.util.List;
import java.util.Map;

import com.cloudcross.ssp.base.service.IGenericService;
import com.cloudcross.ssp.model.BannerOperator;
import com.cloudcross.ssp.model.Zone;
import com.cloudcross.ssp.web.widget.SelectorController.ISelector;

public interface IZoneService extends IGenericService<Zone> {
    long findByName(String name);

    String deleteById(long id);

    /**
     * 根据设备和场景id查询广告位信息
     *
     * @author wuqiang.du
     */
    List<Zone> findByDeviceAndPlaceId(Map<String, Object> paramMap);

    List<Zone> findByOperatorId(Integer operatorId);

    List<Zone> findDeliverEffectAnalysis(Map<String, Object> paramMap);

    List<Zone> findByOperatorId(Long operatorId);

    int countByParamsBack(Map<String, Object> paramMap);

    Zone findByIdBack(Long id);

    List<Zone> findByOperatorIdBack(Integer operatorId);

    Map<String, List<? extends ISelector>> provideDataBack(String[] parentId);

    // 根据媒体ID查询广告位
    List<Zone> queryZoneByCondition(Map<String, Object> conditon);

    List<Zone> queryZoneByAdgroupId(Long adgroupId);

    // 获取需要运营商审核的创意的比例宽和比例高
    List<Zone> needCheck(Map<String, Object> paramMap);

    // 获取需要资审且未审核或审核未通过的广告位列表
    List<Zone> operatorId(Map<String, Object> paramMap);

    // 根据创意ID和运营商ID获取对应的审核状态
    BannerOperator checkedStatus(Map<String, Object> paramMap);

    Integer queryZoneCount(Map<String, Object> condition);

    Integer checkedNum(Map<String, Object> paramMap);

    Integer needCheckedAccountCount(Map<String, Object> paramMap);

    List<Zone> queryZone(Map<String, Object> condition);

    List<Zone> queryZoneByOperatorIdStr(Map<String, Object> condition);

    String queryZoneNameById(Long id);

    Zone queryZoneByName(long name);

    //广告位根据website来匹配
    List<Zone> queryZoneWebsite(Map<String, Object> condition);
}
